package com.second.app.designpattern.observer;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author GYZ
 * @Date 2023/11/10
 * <pre>
 *
 * </pre>
 */
public class Main {

    public static void main(String[] args) {
        List<String> msgList = new ArrayList<>();
        msgList.add("2020-06-22 RNG VS IG");
        msgList.add("2020-06-22 VG VS LGD");
        msgList.add("2020-06-22 V5 VS OMG");
        LolSubject lolSubject = new LolSubject("TSE VS FPX",msgList);

        CurrentObserver currentObserver = new CurrentObserver(lolSubject);
        FutureObserver futureObserver = new FutureObserver(lolSubject);

        lolSubject.registerObserver(currentObserver);
        lolSubject.registerObserver(futureObserver);
        lolSubject.notifyObservers();

    }
}
